<?php
/**
 * Author Yulin
 * Email  dwzhanglong@126.com
 * Date   2017-7-21
 * Func   公告与帮助
 */
defined('IN_YuLin') || exit('NO PERMIT!');
$type         = NoBadStr($_GET['t']);
$tab          = '';
$where        = ' WHERE ';
$page         = '';
if ($type == 'message'){
    $tab      = Table('user_message');
    $uid      = $_SESSION['uid'];
    $where   .= ' uid = ' . $uid;
    $page     = 'article/message_list';
}else{
    $tab      = Table('article');
    $where   .= ' cid = 1';
    $page     = 'article/notics_list';
}
$sql          = 'SELECT id, title, content, dateline FROM ' . $tab . $where;
$noticsInfo   = $db->getall($sql);
$tpl->display($page);